﻿#region "<---- Using Definitions ---->"

using System;
using System.Diagnostics;
using Microsoft.Practices.EnterpriseLibrary.Logging;

#endregion

#region "<---- Namespace Definition ---->"

namespace CXMLStudioIDE.Common
{

    #region "<---- CXMLTracer Class Definition ---->"

    class CXMLTracer
    {
        private enum LogCategory
        {
            UITrace,
            DATrace,
            BLTrace
        }

        public CXMLTracer()
        {
        }

        private void Write(string message, LogCategory category, string title)
        {
            LogEntry logEntry = new LogEntry();
            logEntry.Message = message;
            logEntry.Categories.Add(category.ToString());
            logEntry.Title = title;
            //Logger.Write(logEntry);

        }
        public void WriteUILog(string title, string message)
        {
            // Events from UI can be logged here 
            // WriteUILog 
            Write(message, LogCategory.UITrace, title);
        }

        public void WriteBLLog(string title, string message)
        {
            // Events from UI can be logged here 
            Write(message, LogCategory.BLTrace, title);
        }

        public void WriteDALog(string title, string message)
        {
            // Events from UI can be logged here 
            Write(message, LogCategory.DATrace, title);
        }
    }

    #endregion

}

#endregion
